﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Abs_classes_data;
using System_States_Signals;

namespace Conc_classes_data
{
    public class reservoire_controller : abs_controller
    {
        public reservoire_controller(reservoire_sensor sensor, Double value)
            : base(sensor,value)
        {
        }

        protected override Value_State Check_statement()
        {
            if (abs_sensor.Not_Initialized == this._sensor.Value)
            {
                return Value_State.Not_Initialized;
            }

            if (this._sensor.Value < 50)
            {
                return Value_State.Crash;
            }
            else
            {
                if (this._sensor.Value < this._normal_value - 50)
                {
                    return Value_State.Check;
                }
                else
                {
                    return Value_State.Normal;
                }
            }            
        }
    }
}
